home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / 3rd Party Demos / 3rd Party Plugins / Interface / DragWindowPlugin / Read Me! < prev   
Encoding:
Text File  |  1999-07-30  |  1.1 KB  |  34 lines

  1. DragWindow Plugin
  2. A freeware REALbasic plugin
  3. Version 1.0a3 – 30/07/99 – Jakob Bock
  4.  
  5. This plugin gives you access to the Mac OS toolbox function DragWindow.
  6.  
  7. Requirements
  8. The demo project requires REALbasic 2.1a4 or later and use the "Odo" WDEF by Gregory Lemperle-Kerr
  9. ( "Odo WDEF ©1996 AKUA interactive media AG" ).
  10.  
  11. How to use the plugin
  12. To use the plugin ( the way it was intended ) put the following code into a MouseDown event ( of a window, canvas object . . . ):
  13.  
  14.  
  15. dim m as memoryBlock
  16. m = newmemoryblock(4)
  17.  
  18. m.long(0) = DragWindow( w as window )
  19.  
  20. self.top = m.short(0)
  21. self.left = m.short(2)
  22.  
  23. return true
  24.  
  25.  
  26. "w" should usually be "self". The plugin function doesn't move your window, so you'll have to do that yourself. The funtion returns a C Point as an integer, and the code above shows you how to extract the horisontal and vertical values.
  27.  
  28. Note
  29. This plugin was only tested on my own computer ( a G3 running OS8.5.1/8.6 ) - and I'm not a C/MacOSToolbox guru. Use it at you own risk.
  30.  
  31. - - - -
  32.  
  33. Please send comments, bug reports, feature requests to:
  34. jakob.bock@designsem.dk